package com.yun.service;

import com.yun.mapper.RunAwayMapper;
import com.yun.pojo.RunAway;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.LinkedHashMap;
import java.util.List;

/**
 * Created by qzy017 on 2019/7/2.
 */

@Service
public class RunAwayService {
    @Autowired
    RunAwayMapper runAwayMapper;

    public void addRunAway(RunAway runAway) {
            runAwayMapper.addRunAway( runAway);

    }
    //月度排名
    public List<LinkedHashMap> monthRunAway(RunAway runAway) {

       return runAwayMapper.monthRunAway( runAway);
    }
  //按年排名
    public List<LinkedHashMap> yearRunAway(RunAway runAway) {

        return runAwayMapper.yearRunAway( runAway);
    }
  //按周排名
    public List<LinkedHashMap> weekRunAway(RunAway runAway) {

        return runAwayMapper.weekRunAway( runAway);
    }


    //最大里程  时间和卡路里
    public LinkedHashMap  maxDistanceTimeCalories(RunAway runAway) {


          return  runAwayMapper.maxDistanceTimeCalories( runAway);


    }
   //个人的所有里程数
    public LinkedHashMap allDistance(RunAway runAway) {

        return  runAwayMapper.allDistance( runAway);
    }
}
